#ifndef MD5_H
#define MD5_H

#ifndef __alpha
#define __alpha
#endif

#ifndef uint32
#ifdef __alpha
typedef unsigned int uint32;
#else
typedef unsigned long uint32;
#endif
#endif

typedef struct MD5Context {
        uint32 buf[4];
        uint32 bits[2];
        unsigned char in[64];
} MD5Context_t;

extern void MD5Init(MD5Context_t *ctx);
extern void MD5Update(MD5Context_t *ctx, unsigned char *buf, unsigned int len);
extern void MD5Final(unsigned char digest[16], MD5Context_t *ctx);
extern void MD5Transform(uint32 buf[4],uint32 in[16]);

/*
* This is needed to make RSAREF happy on some MS-DOS compilers.
*/
typedef struct MD5Context MD5_CTX;

#endif /* !MD5_H */

/************************************************************************/
/* E.G.                                                                 */
/************************************************************************/
//int main0( int argc, char **argv )
//{
//	struct MD5Context md5c;
//	char *s;
//	unsigned char ss[16];
//	char buf[33]={'\0'};
//	char tmp[3]={'\0'};
//	int i;
//
//	if( 2!=argc )
//	{
//		printf( "usage :\tmd5 <string>\n" );
//		return 1;
//	}
//	s = argv[1];
//
//	MD5Init( &md5c );
//	MD5Update( &md5c, s, strlen(s) );
//	MD5Final( ss, &md5c );
//
//	for( i=0; i<16; i++ ){
//		sprintf(tmp,"%02X", ss[i] );
//		strcat(buf,tmp);
//	}
//	printf("%s",buf);
//	printf( "\t%s\n", s );
//
//	return 0;
//}
